#ifndef __2BWTSEARCH_CPU_H__
#define __2BWTSEARCH_CPU_H__
#include "Index.h"
#include "Query.h"
#include "mian_util.h"



uint64 CPUBWT2Mismatch(	uint3* outSA, 
						unsigned int* Queries, unsigned int numQuery, 
						BWT* bwt, BWT* revbwt);
						
uint64 CPU2BWTSearch_limit(long* numMatch, uint3* outSA, 
					unsigned int* Queries, unsigned int numQuery, 
					BWT* bwt, BWT* revbwt);


uint64 CPU2BWTSearchTwoStrandLimit(long* numMatch, uint3* outSA,
                                        unsigned int* Queries, unsigned int* revQueries,
                                        unsigned int numQuery,
                                        BWT* bwt, BWT* revbwt);
						
						
//////////////////////////////////				
						
void CPU2BWTInit(BWT* bwt, BWT* revbwt);
uint64 CPU2BWTSearch(uint3* outSA, 
					unsigned int* Queries, unsigned int numQuery, 
					BWT* bwt, BWT* revbwt);
uint64 reportCPUResult(uint3* sa, const uint64 numSA);

uint64 preprocess(uint3* outSA, 
					unsigned int* Queries, unsigned int numQuery, 
					BWT* bwt, BWT* revbwt);

#endif /*__2BWTSEARCH_CPU_H__*/
